package Types;

import java.util.List;
import readData.Tokenizer;

public class Sentence {

    String text;
    String simplifiedText;
    String id;
    List<Entity> entitiesList;
    List<DDI> ddiList;

    public Sentence() {
    }

    public Sentence(String text, String id, List<Entity> entitiesList, List<DDI> ddiList) {
        this.text = text;
//        Tokenizer tokenizer = new Tokenizer();
//        this.simplifiedText = tokenizer.tokenize(text);
        this.id = id;
        this.entitiesList = entitiesList;
        this.ddiList = ddiList;
    }

    public List<DDI> getDdiList() {
        return ddiList;
    }

    public void setDdiList(List<DDI> ddiList) {
        this.ddiList = ddiList;
    }

    public List<Entity> getEntitiesList() {
        return entitiesList;
    }

    public void setEntitiesList(List<Entity> entitiesList) {
        this.entitiesList = entitiesList;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
    
    public String getSimplifiedText() {
        return simplifiedText;
    }

    public void setSimplifiedText(String text) {
        this.simplifiedText = text;
    }

    public void print() {
        System.out.println("text = " + this.text);
        System.out.println("simplifiedText = " + this.simplifiedText);
        System.out.println("id = " + this.id);
        for (int i = 0; i < entitiesList.size(); i++) {
            System.out.print("Entity id = " + this.entitiesList.get(i).getId());
            System.out.print("  text = " + this.entitiesList.get(i).getText());
            System.out.print("  charoffset = " + this.entitiesList.get(i).getCharOffset());
            System.out.print("  type = " + this.entitiesList.get(i).getType());
            System.out.print("  start = " + this.entitiesList.get(i).getCharOffset_start());
            System.out.println("  end = " + this.entitiesList.get(i).getCharOffset_end());
        }
        for (int i = 0; i < ddiList.size(); i++) {
            System.out.print("DDI id = " + this.ddiList.get(i).getId());
            System.out.print(" type = " + this.ddiList.get(i).getType());
//            System.out.println("DDI type_text = " + this.ddiList.get(i).getType_text());
            System.out.print(" firstID = " + this.ddiList.get(i).getId_firstEnt());
            System.out.println(" secondID = " + this.ddiList.get(i).getId_secondEnt());
//            System.out.println("DDI firstID real = " + this.ddiList.get(i).getFirstEnt().getId());
//            System.out.println("DDI secondID real = " + this.ddiList.get(i).getSecondEnt().getId());

        }
    }

    private void preProcessSentence() {
    }
}
